/////封装的AJAX
function AJAX(options){
    return new Promise((resolve,reject)=>{
        let request=new XMLHttpRequest()
        request.open(options.methods,options.url)
        request.send()
        request.onreadystatechange=()=>{
            if(request.readyState===4){
                console.log('响应完成')
                if(request.status===200){
                    console.log('请求完成')
                    let test=request.responseText
                    let dom=JSON.parse(test)
                     resolve(dom)
                }else{
                    console.log('请求失败')
                }
            }//没有esle了
        }
    })
}